import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import { configRouter } from "./router/routerConfig";
import store from "./store";
//全局样式
import "./assets/style/global.less";
//全局路由配置
configRouter(router, store);
//element ui plus
import {
  ElRow,
  ElCol,
  ElContainer,
  ElAside,
  ElHeader,
  ElMain,
  ElFooter,
  ElIcon,
  ElTable,
  ElPagination,
} from "element-plus";
// ???要引入样式？？？
import "element-plus/dist/index.css";
const app = createApp(App);
app.config.globalProperties.$filters = {
  mobileFormat(value) {
    if (value) {
      return value.replace(/(\d{3})\d{4}(\d{4})/, `$1****$2`);
    }
    return "";
  },
};
//element ui plus
app
  .use(ElRow)
  .use(ElCol)
  .use(ElContainer)
  .use(ElAside)
  .use(ElHeader)
  .use(ElMain)
  .use(ElFooter)
  .use(ElIcon)
  .use(ElTable)
  .use(ElPagination);

app.use(store).use(router).mount("#app");
